import java.util.Scanner;

public class Test {
    public static int add(int x){
        int sum = 1;
        for (int i = x; i > 0; i--) {
            sum *= i;
        }
        return sum;
    }
    public static int add1(int y){
        int Sum = 0;
        for(int k = y;k > 0;k--){
            Sum += add(k);
        }
        return Sum;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ret = add1(n);
        System.out.println(ret);
        sc.close();
    }

}
